//
//  Baby.m
//  Day7
//
//  Created by wenjim on 17/10/20.
//  Copyright © 2017年 WenJim. All rights reserved.
//

#import "Baby.h"
#import "Nanny.h"

@implementation Baby

-(void)food
{
    self.hungry += 5;
    NSLog(@"要吃东西 %i",self.hungry);
    if ([self.nanny respondsToSelector:@selector(feedFood:)]) {
        
        // 通知保姆
        [self.nanny feedFood:self];
    }
}

-(void)sleepy
{
    self.sleep += 5;
    NSLog(@"我困了 %i",self.sleep);
    if ([self.nanny respondsToSelector:@selector(hongBaby:)]) {
        // 通知保姆
        [self.nanny hongBaby:self];
    }
    
}

@end
